package com.pug.product.rest;

import com.pug.product.dto.QuestionTemplateQueryReqDTO;
import com.pug.product.dto.QuestionTemplateQueryRespDTO;
import com.pug.product.service.IQuestionTemplateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import xq.pug.common.result.R;

/**
 * @author RenGaoshuai
 * @date 2023/8/7 10:35
 * @description
 */
@RestController
@RequestMapping("/questionTemplate")
public class QuestionTemplateController {

    @Autowired
    private IQuestionTemplateService questionTemplateService;

    @PostMapping("/query")
    public R<QuestionTemplateQueryRespDTO> queryById(@RequestBody QuestionTemplateQueryReqDTO reqDTO) {
        QuestionTemplateQueryRespDTO respDTO = questionTemplateService.selectById(reqDTO.getId());
        return R.ofSuccess(respDTO);

    }
}
